import torch.nn as nn
import torch.nn.functional as F


class Generator(nn.Module):

    def __init__(self, feature_dim, vocab_size):
        super(Generator, self).__init__()
        self.project = nn.Linear(feature_dim, vocab_size)

    def forward(self, x):
        return F.log_softmax(self.project(x), dim=-1)